Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a invalid memory reference error identified by gfortran #1668

Closed
wants to merge 1 commit into from
Closed

Fix a invalid memory reference error identified by gfortran #1668

wants to merge 1 commit into from

Conversation

weiwangncar
Copy link
Collaborator

Fix a memory problem in Noah LSM after PR#1641

TYPE: bug fix

KEYWORDS: memory issue, Noah LSM, WRF-Hydro

SOURCE: internal

DESCRIPTION OF CHANGES:
Problem:
After PR#1641 merge, which consisted modification and additions to NoahMP, problems showed up in the model when Noah LSM is used. Errors include random failures when running with a relatively large domain (581x501x56 in one test) and nests, and when model is trying to write output.

Solution:
Using 'configure -D' with gfortran identified the failure in module_sf_noahdrv.F. Examination of the routine suggests the code related to WRF-Hydro implementation could be an issue when WRF-Hydro is not use. Revision is made to the driver so that variables related to WRF-Hydro are properly defined when WRF-Hydro is not used or arrays are not defined.

LIST OF MODIFIED FILES:
M phys/module_sf_noahdrv.F
M phys/module_surface_driver.F

TESTS CONDUCTED:

  1. Previously failed large domain and nest tests are working now.
  2. Are the Jenkins tests all passing?

RELEASE NOTE:

@weiwangncar weiwangncar requested review from a team as code owners February 9, 2022 17:49
Copy link
Collaborator

@dudhia dudhia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the correct thing to do, but this code has been there since WRF hydro began including the packaging.
Was the invalid reference directly with these arrays in Noah?

@dudhia
Copy link
Collaborator

dudhia commented Feb 10, 2022

Any idea of what caused the failed test?

@weiwangncar
Copy link
Collaborator Author

@dudhia This is the fail due to a test for NoahMP which we fixed in PR#1670.

@weiwangncar
Copy link
Collaborator Author

This PR is replaced by PR#1671.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants